package org.ykh.service.web.filter;



import org.ykh.service.web.RequestWrapper;

import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

/**
 * @author ykh
 */
public class RequestWrapperFilter implements Filter {
    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
            ServletException {
        request = new RequestWrapper((HttpServletRequest) request);
        //Read request.getBody() as many time you need
        chain.doFilter(request, response);
    }


}
